<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header','admin');?>
<div id="closeParentTime" style="display:none"></div>
<SCRIPT LANGUAGE="JavaScript">
<!--
	if(window.top.$("#current_pos").data('clicknum')==1 || window.top.$("#current_pos").data('clicknum')==null) {
	parent.document.getElementById('display_center_id').style.display='';
	parent.document.getElementById('center_frame').src = '?m=content&c=type_manage&a=public_categorys&type=add&typeid=<?php echo $_GET['typeid'] ?>&menuid=<?php echo $_GET['menuid'];?>&pc_hash=<?php echo $_SESSION['pc_hash'];?>';
	window.top.$("#current_pos").data('clicknum',0);
}
//-->
</SCRIPT>
<div class="pad-10">

<?php
	$this->au = pc_base::load_model('admin_model');
	$auarr=$this->au->get_one(array('username'=>$admin_username));
	$tyarr=string2array($auarr['type']);
	$this->db = pc_base::load_model('content_model');
	
	$this->ty = pc_base::load_model('type_model');
	//$tyarr=$this->ty->select(array('module'=>'content'));
	//$typearr=string2array($info['type']);
	$tinfo=$this->ty->get_one(array('typeid'=>$_GET['typeid']));
?>
<div class="col-2 col-auto">
	<h6><?php echo $tinfo['name'] ?>信息</h6>
	<div class="content">
    
    <?php
	$CATEGORYS = getcache('category_content_1','commons');
	$stime = mktime(0,0,0,date("m",time()),date("d",time()),date("Y",time()));
	$tinfo=$this->ty->get_one(array('typeid'=>$r));
	echo "【$tinfo[name]总】<br>";
	foreach($CATEGORYS as $v){
		$this->db->set_model($v[modelid]);
		$t=$this->db->count(array('typeid'=>$_GET['typeid']));
		$t1=$this->db->count(array('typeid'=>$_GET['typeid'],'status'=>99));
		echo $v[catname].":".$t."条&nbsp;&nbsp;审核通过".$t1."条&nbsp;&nbsp;未通过".($t-$t1)."条<br>";
	}
	
	echo "<br>【$tinfo[name]今】<br>";
	foreach($CATEGORYS as $v){
		$this->db->set_model($v[modelid]);
		$t=$this->db->count("typeid=".$_GET['typeid']." and inputtime>$stime");
		$t1=$this->db->count("typeid=".$_GET['typeid']." and inputtime>$stime and status=99");
		echo $v[catname].":".$t."条&nbsp;&nbsp;审核通过".$t1."条&nbsp;&nbsp;未通过".($t-$t1)."条<br>";
	}
		
	?>
	<div class="bk20 hr"><hr /></div>
    
	</div>
</div>






</div>
<script language="javascript" type="text/javascript" src="<?php echo JS_PATH?>cookie.js"></script>
<script type="text/javascript"> 
<!--
function push() {
	var str = 0;
	var id = tag = '';
	$("input[name='ids[]']").each(function() {
		if($(this).attr('checked')=='checked') {
			str = 1;
			id += tag+$(this).val();
			tag = '|';
		}
	});
	if(str==0) {
		alert('<?php echo L('you_do_not_check');?>');
		return false;
	}
	window.top.art.dialog({id:'push'}).close();
	window.top.art.dialog({title:'<?php echo L('push');?>：',id:'push',iframe:'?m=content&c=push&action=position_list&catid=<?php echo $catid?>&modelid=<?php echo $modelid?>&id='+id,width:'800',height:'500'}, function(){var d = window.top.art.dialog({id:'push'}).data.iframe;// 使用内置接口获取iframe对象
	var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'push'}).close()});
}
function confirm_delete(){
	if(confirm('<?php echo L('confirm_delete', array('message' => L('selected')));?>')) $('#myform').submit();
}
function view_comment(id, name) {
	window.top.art.dialog({id:'view_comment'}).close();
	window.top.art.dialog({yesText:'<?php echo L('dialog_close');?>',title:'<?php echo L('view_comment');?>：'+name,id:'view_comment',iframe:'index.php?m=comment&c=comment_admin&a=lists&show_center_id=1&commentid='+id,width:'800',height:'500'}, function(){window.top.art.dialog({id:'edit'}).close()});
}
function reject_check(type) {
	if(type==1) {
		var str = 0;
		$("input[name='ids[]']").each(function() {
			if($(this).attr('checked')=='checked') {
				str = 1;
			}
		});
		if(str==0) {
			alert('<?php echo L('you_do_not_check');?>');
			return false;
		}
		document.getElementById('myform').action='?m=content&c=content&a=pass&catid=<?php echo $catid;?>&steps=<?php echo $steps;?>&reject=1';
		document.getElementById('myform').submit();
	} else {
		$('#reject_content').css('display','');
		return false;
	}	
}
setcookie('refersh_time', 0);
function refersh_window() {
	var refersh_time = getcookie('refersh_time');
	if(refersh_time==1) {
		window.location.reload();
	}
}
setInterval("refersh_window()", 3000);
//-->
</script>
</body>
</html>